<template>
	
	<view class="padding_22rpx">
		<view class="font-overflow2" style="font-weight: ;">
			{{noiceDetail.title}}
		</view>
		<view class="" style="margin-top: 20rpx;">
			<text style="color: #999999;">{{noiceDetail.create_time}}</text>
		</view>
		
		<view class="" style="margin-top: 20rpx;">
			<uv-parse  :content="noiceDetail.content" :selectable="true" :tagStyle="style"></uv-parse>
		</view>
		
		
	</view>
</template>

<script>

	export default {
		
		components: {
			
		},
		data() {
			return {
				
				daziBg1: this.$img.daziBg1,
				search: this.$img.search,
				userInfo: uni.getStorageSync("userInfo"),
				test: '<p>&nbsp;中国质量新闻网讯 厦门市应对新冠肺炎疫情工作指挥部 发布11号通告后，思明区市场监管局迅速行动，昼夜出 击，从严从实从细贯彻通告要求，既注意抓严格执法， 也注意工作方式方法。</p>\n<p><img src=\"https://dazi.weijuyunke.cn/storage/uploads/20240911/ec1356c6d1ac4a92b26ae352b313a1e6.jpg\" alt=\"\" width=\"350\" height=\"288\" /></p>\n<p>&nbsp;中国质量新闻网讯 厦门市应对新冠肺炎疫情工作指挥部 发布11号通告后，思明区市场监管局迅速行动，昼夜出 击，从严从实从细贯彻通告要求，既注意抓严格执法， 也注意工作方式方法。</p>',
				downOption: {
					auto: false
				},
				style: {
					// 字符串的形式

					p: 'font-size: 24rpx;color: #999999;'
				},
				// 上拉配置项
				upOption: {
					auto: true
				},
				windowHeight: 0,
				list: [],
				searchVal: '',
				count: '',
				messageList: [],
				noiceDetail:null

			}
		},
		onLoad(options) {
		    if (options.id) {
		    
		    
		    
		    	const decodedData = {};
		    	for (const key in options) {
		    		// 解码当前字段的值
		    		const decodedValue = decodeURIComponent(options[key]);
		    
		    		// 将解码后的值存储到新的对象中
		    		decodedData[key] = decodedValue;
		    	}
		    
		      
		      this.noiceDetail=decodedData
			  console.log( this.noiceDetail)
		    
		    
		    }
			 
		},
		methods: {
			toDetailFn(){
				
				this.$sun.navGo('/pagesA/personalCenter/notificationDetails')
			},
			async upCallback(scroll) {

				const result = await this.$http.post({
					url: this.$api.message,
					data: {
						page: scroll.num,
						limit: 10,




					},
					headers: {
						'Authorization': this.userInfo.token
					}

				})


				if (result.code == 0) {

					this.mescroll.endByPage(result.data.list.length, this.$sun.pagingSum(result.data.count, 10));
					if (scroll.num == 1) this.list = [];

					this.list = this.list.concat(result.data.list);





					console.log('this.list', this.list, this.list.length);
				} else {
					this.$sun.toast(result.message, 'none')
				}


			},

			async tabClassIfyFn() {
				console.log(this.userInfo.token)
				const resPoster = await this.$http.post({
					url: this.$api.tabList,
					data: {

						type: 3,
						// pid:0,
						top: 1

					},
					headers: {
						'Authorization': this.userInfo.token
					}

				})

				if (resPoster.code == 0) {
					console.log(resPoster)
					this.tabsList = resPoster.data.list
					if (resPoster.data.list.length) {
						this.son_tab = resPoster.data.list[0].id
					}
					this.tabs = resPoster.data.list.slice(0, 5).map((item) => {
						return item.name;
					});
					this.$nextTick(() => {
						this.mescroll?.resetUpScroll();
					})

				} else {

					this.$sun.toast(resPoster.message, 'none')
				}
			},
			// unReadMessage


		},
		computed: {
			numberMessages: function() {
				return function(num) {

					if (num > 99) {

						return String(99) + '+';
					} else {

						return String(num);
					}
				};
			}
		},
	}
	
	
</script>

<style>
</style>